
clear
use "D:\Dropbox\Dropbox\Lueck and Parker\JAERE submission\Final Version 2024\Data and Code for Replication\Ag1860_1920.dta", clear
drop if name=="ALASKA"
joinby name year using "D:\Dropbox\Dropbox\Lueck and Parker\JAERE submission\Final Version 2024\Data and Code for Replication\PopData1860_1920.dta", unmatched(both)
drop _merge

gen code=""			
replace code =	"AL"	if name==	"ALABAMA"
replace code =	"AZ"	if name==	"ARIZONA"
replace code =	"AR"	if name==	"ARKANSAS"
replace code =	"CA"	if name==	"CALIFORNIA"
replace code =	"CO"	if name==	"COLORADO"
replace code =	"CT"	if name==	"CONNECTICUT"
replace code =	"DE"	if name==	"DELAWARE"
replace code =	"FL"	if name==	"FLORIDA"
replace code =	"GA"	if name==	"GEORGIA"
replace code =	"HI"	if name==	"HAWAII"
replace code =	"ID"	if name==	"IDAHO"
replace code =	"IL"	if name==	"ILLINOIS"
replace code =	"IN"	if name==	"INDIANA"
replace code =	"IA"	if name==	"IOWA"
replace code =	"KS"	if name==	"KANSAS"
replace code =	"KY"	if name==	"KENTUCKY"
replace code =	"LA"	if name==	"LOUISIANA"
replace code =	"ME"	if name==	"MAINE"
replace code =	"MD"	if name==	"MARYLAND"
replace code =	"MA"	if name==	"MASSACHUSETTS"
replace code =	"MI"	if name==	"MICHIGAN"
replace code =	"MN"	if name==	"MINNESOTA"
replace code =	"MS"	if name==	"MISSISSIPPI"
replace code =	"MO"	if name==	"MISSOURI"
replace code =	"MT"	if name==	"MONTANA"
replace code =	"NE"	if name==	"NEBRASKA"
replace code =	"NV"	if name==	"NEVADA"
replace code =	"NH"	if name==	"NEW HAMPSHIRE"
replace code =	"NJ"	if name==	"NEW JERSEY"
replace code =	"NM"	if name==	"NEW MEXICO"
replace code =	"NY"	if name==	"NEW YORK"
replace code =	"NC"	if name==	"NORTH CAROLINA"
replace code =	"ND"	if name==	"NORTH DAKOTA"
replace code =	"OH"	if name==	"OHIO"
replace code =	"OK"	if name==	"OKLAHOMA"
replace code =	"OR"	if name==	"OREGON"
replace code =	"PA"	if name==	"PENNSYLVANIA"
replace code =	"RI"	if name==	"RHODE ISLAND"
replace code =	"SC"	if name==	"SOUTH CAROLINA"
replace code =	"SD"	if name==	"SOUTH DAKOTA"
replace code =	"TN"	if name==	"TENNESSEE"
replace code =	"TX"	if name==	"TEXAS"
replace code =	"UT"	if name==	"UTAH"
replace code =	"VT"	if name==	"VERMONT"
replace code =	"VA"	if name==	"VIRGINIA"
replace code =	"WA"	if name==	"WASHINGTON"
replace code =	"WV"	if name==	"WEST VIRGINIA"
replace code =	"WI"	if name==	"WISCONSIN"
replace code =	"WY"	if name==	"WYOMING"

joinby code year using "D:\Dropbox\Dropbox\Lueck and Parker\JAERE submission\Final Version 2024\Data and Code for Replication\Urban1860_1920.dta", unmatched(both)
drop _merge

save "D:\Dropbox\Dropbox\Lueck and Parker\JAERE submission\Final Version 2024\Data and Code for Replication\panel1860_1920.dta", replace 
